Reuse Slug atlas projections during compilation - #171
Conversation
|
Follow-up startup profile for
The working-document open phase improves 8.1x; inspect + open + complete atlas improves 41.6%. The resumed atlas includes lazy SQLite layer acquisition. This measures a complete atlas, not placeholders; renderer transfer/upload is outside this harness. In the app, |
|
Background atlas preparation profile for
The native profiler independently measured resumed authored compilation at 245.2 ms and aligned preparation at 1.72 ms. The compilation request is now sent from main only after the open response is received, then runs in utility while the workspace window and WebGPU start. The previously observed renderer/window interval was about 500 ms, so this work should be hidden rather than added to open latency. The grid still waits for the complete atlas; no placeholder or partial geometry path was introduced. Output remains 699 roots, 1,290 atlas glyphs, 12,713 curves, 998 components, and 2,190,648 bytes. |
|
Follow-up Native changes:
Fraunces release samples:
All commit hooks, Rust tests, native bridge tests, and Clippy passed. The existing documentation drift checker still reports the same 13 unrelated main-branch errors. |
Summary
GlyphProjectionSetfor each authored Slug compilation and reuse it for weight collection, roots, component closures, exact sources, and fallback resolutionArc, while keeping resolved source glyphs root-local so reuse cannot survive edits or inflate full-font temporary memoryBridge.prepareSlugAtlaspath plus a release profiler that verifies atlas counts across cold, resumed, and warm preparationsFraunces release results
Same Ryzen 5 5500U, same
/home/firmclaw/fraunces.shift, throughBridge.prepareSlugAtlas(256):47fc8c01Warm p50 improves 5.41x (81.5%). Output is unchanged at 699 roots, 1,290 atlas glyphs, 12,713 curves, 998 components, and 2,190,648 bytes. The resumed result includes 141.493 ms of lazy acquisition; warm native atlas compilation is approximately 99–101 ms.
Parallelism is intentionally deferred: duplicate-work removal already exceeds the sub-second target, and deterministic parallel atlas merging would add memory and complexity before measurement justifies it.
Verification
cargo test -p shift-fontcargo test -p shift-slug --all-featurescargo clippy -p shift-font -p shift-slug -p shift-bridge --all-targets --all-features -- -D warningspnpm test:nativepython3 scripts/context-drift-check.pystill reports the existing unrelated app documentation errors described onmain. An authored Source Han.shiftcorpus was not available on this machine; the implementation avoids a complete resolved-glyph table and retains only root-local resolved source results.